﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PlantQuery.aspx.cs" Inherits="Plant_PlantQuery" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>DeliveryAplly</title>
    <link href="../CSS/SubStyle.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/delivery.css" rel="stylesheet" type="text/css" />
    <script src="../Jscript/popcalendar.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="600">
        <Services><asp:ServiceReference Path="~/webservice/DeliveryApplyWebService.asmx" /></Services>
        </asp:ScriptManager>    
        <asp:UpdatePanel ID="UpdHead" runat="server">
       <ContentTemplate>
        <table cellpadding="0" cellspacing="0" class="topTable">
            <tr>
                <td class="topTd">
                    <asp:Label ID="lblLocation" runat="server" Text="<%$ Resources:language, Location %>"></asp:Label>
                    <img alt="当前位置" src="../Image/weizhi.gif" />>><asp:Label ID="Label1" runat="server" Text="Plant查询"></asp:Label>
                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources:language, Must1 %>"></asp:Label>
                    <span style="color:#ff0000">*</span><asp:Label ID="Label3" runat="server" Text="<%$ Resources:language, Must2 %>"></asp:Label>
                </td>
            </tr>
        </table>  <div id="covertDiv" class="transp" style="display:none;"></div> 
    <fieldset>
        <legend><span style="font-size: 12px;">
            <asp:Label ID="lblLegend1" runat="server" Text="操作"></asp:Label></span></legend>        
                    <table cellpadding="0" cellspacing="0" class="topHeadTable">                       
                        <tr>
                            <td class="trHeadFoot">
                                &nbsp;</td>
                            <td class="trHeadFoot" colspan="5">
                            </td>
                        </tr>
                        <tr>
                            <td class="td10">
                                &nbsp;</td>
                            <td class="td10">
                                &nbsp;</td>
                            <td class="td20">
                                <asp:RadioButtonList ID="RadType" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Selected="True" Value="1">SY</asp:ListItem>
                                    <asp:ListItem Value="2">NJ</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td class="td10">
                                &nbsp;</td>
                            <td class="td20">
                                &nbsp;</td>
                            <td class="td20">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="td10">
                                &nbsp;</td>
                            <td class="td10">
                                <asp:Label ID="Label10" runat="server" Text="Plant SoNo:"></asp:Label>
                            </td>
                            <td class="td20">
                                <asp:TextBox ID="txtSoNo" runat="server" CssClass="txtStyleD"></asp:TextBox>
                            </td>
                            <td class="td10">
                                <asp:Label ID="Label9" runat="server" Text="SO Status:"></asp:Label>
                            </td>
                            <td class="td20">
                                <asp:DropDownList ID="ddlSOStatus" runat="server" Width="100%">
                                    <asp:ListItem Value="Open" Text="Open"></asp:ListItem>
                                    <asp:ListItem Value="Close" Text="Close"></asp:ListItem>
                                    <asp:ListItem Value="All" Text="All"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td class="td20">
                            </td>
                        </tr>
                        <tr>
                            <td class="td10">
                                &nbsp;</td>
                            <td class="td10">
                                <asp:Label ID="Label7" runat="server" Text="Customer PO:"></asp:Label>
                            </td>
                            <td class="td20">
                                <asp:TextBox ID="txtCustomerPO" runat="server" CssClass="txtStyle"></asp:TextBox>
                            </td>
                            <td class="td10">
                                <asp:Label ID="Label5" runat="server" Text="Customer Name:"></asp:Label>
                            </td>
                            <td class="td20">
                                <asp:TextBox ID="txtCustomerName" runat="server" CssClass="txtStyleD"></asp:TextBox>
                            </td>
                            <td class="td20">
                                &nbsp;</td>
                        </tr>   
                          <tr>
                            <td class="td10" colspan="2">
                                <asp:Label ID="Label11" runat="server" Text="Order Enter Date From:"></asp:Label>
                            </td>
                            <td class="td20">
                                <input id="txtDateFrom" runat="server" class="txtStyle" name="date1"
                                                     onclick="popUpCalendar(this,document.forms[0].txtDateFrom,'yyyy-mm-dd')"
                                                        style="width: 100%; cursor: hand"
                                                        type="text" />
                            </td>
                            <td class="td10">
                                <asp:Label ID="Label13" runat="server" Text="TO:"></asp:Label>
                              </td>
                            <td class="td20">
                                <input id="txtDateTo" runat="server" class="txtStyle" name="date2" 
                                                    onclick="popUpCalendar(this,document.forms[0].txtDateTo,'yyyy-mm-dd')"
                                                        style="width: 100%; cursor: hand" type="text" />
                              </td>
                            <td class="td20">
                            </td>
                        </tr>                       
                        <tr>
                            <td class="trHeadFoot">
                                &nbsp;</td>
                            <td class="trHeadFoot" colspan="5">
                            </td>
                        </tr>
                       </table>
        <div class="cmdButtonsDiv"> 
        <asp:Button ID="cmdQuery" runat="server" CssClass="cmdStyle" Text="查询" 
                onclick="cmdQuery_Click" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="cmdSure" runat="server" 
                CssClass="cmdStyle" Text="重置" onclick="cmdSure_Click" /></div></fieldset>
            </ContentTemplate></asp:UpdatePanel>   
           <asp:UpdateProgress ID="UpdateProgress1" runat="server">
    <ProgressTemplate><span style="font-size:16px; color:Blue;">Data Loading..... </span>             
    </ProgressTemplate>
    </asp:UpdateProgress>   
        <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate>
        <fieldset style="width:99%; text-align:center;">
            <legend><span style="font-size: 12px;">
                <asp:Label ID="lblLegend2" runat="server" Text="列表"></asp:Label></span></legend>
             <div class="grvDiv">
                            <asp:GridView ID="Grv" runat="server" AutoGenerateColumns="False" CssClass="gvStyle"
                                AllowPaging="True" GridLines="None" PageSize="15" Width="100%" 
                                OnPageIndexChanging="Grv_PageIndexChanging" OnRowCommand="Grv_RowCommand" 
                                EnableModelValidation="False" EnableTheming="True">
                                <HeaderStyle CssClass="gvHeader" />
                                <RowStyle CssClass="gvRow" />
                                <AlternatingRowStyle CssClass="gvAllRow" />
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            NO.</HeaderTemplate>
                                        <ItemTemplate>
                                            <%#Grv.PageIndex * Grv.PageSize + Grv.Rows.Count + 1%>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="gvItem" />
                                    </asp:TemplateField>
                                    <%--<asp:BoundField DataField="PlantCustomerPONo" HeaderText="客户订单号">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantSoNo" HeaderText="工厂订单号">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantCustomerNo" HeaderText="客户编号">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantCustomerName" HeaderText="客户名称">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantItemNo" HeaderText="行号">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantDescription1" HeaderText="描述1">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantDescription2" HeaderText="描述2">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantShippedQTY" HeaderText="已发货数量">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantValue" HeaderText="单价">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantCurrency" HeaderText="币别">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantOrderEnterDate" HeaderText="Date Entered">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantOADate" HeaderText="Requested Date">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantRescheduleDate" HeaderText="Scheduled Ship Date">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantWONo" HeaderText="物料编号">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantWOEntryDate" HeaderText="Entry Date">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantWOQty" HeaderText="需求数量">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantWOFinishedQTY" HeaderText="完成数量">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlantWOReleaseDate" HeaderText="Release Date">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                                    </asp:BoundField>--%>
                                </Columns>
                                <PagerTemplate>
                                    <table style="width: 100%;">
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="lblTotal1" runat="server" Text="<%$ Resources:UserSqlPage, Total1 %>"></asp:Label><asp:Label
                                                    ID="lblCount" runat="server"></asp:Label><asp:Label ID="Total2" runat="server" Text="<%$ Resources:UserSqlPage, Total2 %>"></asp:Label>,<asp:Label
                                                        ID="Label5" runat="server" Text="<%$ Resources:UserSqlPage, CurrentPage1 %>"></asp:Label><asp:Label
                                                            ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' /><asp:Label
                                                                ID="Label11" runat="server" Text="<%$ Resources:UserSqlPage, CurrentPage2 %>"></asp:Label>,<asp:Label
                                                                    ID="Label3" runat="server" Text="<%$ Resources:UserSqlPage, TotalPage1 %>"></asp:Label><asp:Label
                                                                        ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' /><asp:Label
                                                                            ID="Label12" runat="server" Text="<%$ Resources:UserSqlPage, TotalPage2 %>"></asp:Label>
                                                <% //首页/上一页 %>
                                                <% if (this.Grv.PageIndex <= 0)
                                                   { %>
                                                <asp:LinkButton ID="LinkButton1" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, FirstPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton2" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, PreviousPage %>" />&nbsp;
                                                <% }
                                                   else
                                                   { %>
                                                <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandArgument="First"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, FirstPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandArgument="Prev"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, PreviousPage %>" />&nbsp;
                                                <% } %>
                                                <% //下一页/尾页 %>
                                                <% if (this.Grv.PageIndex >= Grv.PageCount - 1)
                                                   { %>
                                                <asp:LinkButton ID="LinkButton5" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, NextPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton6" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, LastPage %>" />
                                                <% }
                                                   else
                                                   { %>
                                                <asp:LinkButton ID="LinkButton7" runat="server" CausesValidation="False" CommandArgument="Next"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, NextPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton8" runat="server" CausesValidation="False" CommandArgument="Last"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, LastPage %>" />
                                                <% } %>
                                                <asp:TextBox ID="txtNewPageIndex" runat="server" Text="<%# ((GridView)Container.Parent.Parent).PageIndex + 1%>"
                                                    Width="20px"></asp:TextBox>
                                                <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-1"
                                                    CommandName="NewPage" Text="<%$ Resources:UserSqlPage, PageGo %>"></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </PagerTemplate>
                            </asp:GridView>
                        </div>
        </fieldset>  
        </ContentTemplate></asp:UpdatePanel>   
    </form>
</body>
</html>
